/*
封装模块：统一处理token操作
*/
// 统一配置存储的用户信息的key
const key = 'mytoken1'
// 存储token信息
export const setUser = (userinfo) => {
  localStorage.setItem(key, JSON.stringify(userinfo))
}
// 删除token信息
export const delUser = () => {
  localStorage.removeItem(key)
}
// 获取token信息
export const getUser = () => {
  return JSON.parse(localStorage.getItem(key))
}
